import 'package:flutter_test/flutter_test.dart';
import 'package:vap_plugin/vap_plugin.dart';
import 'package:vap_plugin/vap_plugin_platform_interface.dart';
import 'package:vap_plugin/vap_plugin_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockVapPluginPlatform
    with MockPlatformInterfaceMixin
    implements VapPluginPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final VapPluginPlatform initialPlatform = VapPluginPlatform.instance;

  test('$MethodChannelVapPlugin is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelVapPlugin>());
  });

  test('getPlatformVersion', () async {
    VapPlugin vapPlugin = VapPlugin();
    MockVapPluginPlatform fakePlatform = MockVapPluginPlatform();
    VapPluginPlatform.instance = fakePlatform;

    expect(await vapPlugin.getPlatformVersion(), '42');
  });
}
